import api from "./api"
import axios from "../../../axios";

// 轮播图
export const swiperQuery = (params) => {
  return axios({
    method: "get",
    url: api.love.swiper,
    params,
    headers: {
      "Authorization": window.localStorage.getItem('token')
    }
  })
}

// 公益分类
export const lovelistQuery = () => {
  return axios({
    method: "get",
    url: api.love.lovelist,
    headers: {
      "Authorization": window.localStorage.getItem('token')
    }
  })
}

// 所有公益
export const allloveQuery = () => {
  return axios({
    method: "get",
    url: api.love.alllove,
    headers: {
      "Authorization": window.localStorage.getItem('token')
    }
  })
}

// 捐赠
export const loverecordQuery = (id) => {
  return axios({
    method: "get",
    url: api.love.loverecord,
    params:{typeId:id},
    headers: {
      "Authorization": window.localStorage.getItem('token')
    }
  })
}